<template>
  <view class="region">
    <region
      :all-city="true"
      @getParams="getParamsFn"
    />
  </view>
</template>

<script>
import region from '@/components/region'
import { navigateBackPrePage } from '@/common/common';
export default {
  name: 'SelectArea',
  components: {
    region
  },
  data() {
    return {
      objKey: ''
    }
  },
  onLoad(params) {
    this.objKey = params.objKey
  },
  methods: {
    getParamsFn(data) {
      const params = {}
      params[this.objKey] = data
      navigateBackPrePage(params)
    }
  }
}
</script>

<style scoped lang="scss">
.region {
  width: 100%;
  height: 100vh;
}
</style>
